#region license
"""
A sample client.
Remarks:
	This file is part of Grawlix.
	
	Grawlix is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as
	published by the Free Software Foundation, either version 3 of
	the License, or (at your option) any later version.
	
	Grawlix is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public
	License along with Grawlix.  If not, see
	<http://www.gnu.org/licenses/>.
"""

import Grawlix.Application
import Grawlix.Application.Gui
import Grawlix.Meta
import Grawlix.Services
import Grawlix.Services.Rendering
import System

partial class Governor(UIGovernor):
"""A sample client."""
	
	def constructor([required] game as Game):
	"""
	Construct a new sample client.
	Param game: The game this client is created for.
	"""
		super(game)
#		control = MapView()
#		dom = Game.FindDomain("SampleForest")
#		control.ChangeMap(dom, Rect(-64, -64, 64, 64))
#		GuiManager.TopLevel = control
		uri = Uri("game://example")
		texture = Game.FindResource[of ITextureResource](uri)
		GuiManager.TopLevel = TextureControl(Texture: texture)
	
	def Run(message as Message):
	"""
	Default message handling.
	Param message: The message to handle.
	"""
		# Sample client shouldn't get unexpected
		# messages like this.
		log Warn, "Unknown message to sample client ${message}."
	
	def Run(message as KeyDownInputMessage):
	"""
	Handle keyboard input.
	Param message: The message to handle.
	"""
		pass
	
	def Run(message as KeyUpInputMessage):
	"""
	Handle keyboard input.
	Param message: The message to handle.
	"""
		pass













